package lab02.text37;

/**
 * Created by Administrator on 2017/11/21.
 */
public class StudentDemo {
    public static void main(String[] args) {
        Student[] students=new Student[5];
        students[0] = new Undergraduate();
        students[0].name="HQ";
        students[0].sno="3642564455";
        students[0].scores[0]=90;
        students[0].scores[1]=78;
        students[0].scores[2]=96;
        students[1]=new Undergraduate();
        students[1].name="LY";
        students[1].sno="235565658";
        students[1].scores[0]=64;
        students[1].scores[1]=94;
        students[1].scores[2]=86;
        students[2]=new Graduate();
        students[2].name="YY";
        students[2].sno="245564186";
        students[2].scores[0]=74;
        students[2].scores[1]=78;
        students[2].scores[2]=69;
        students[3]=new Undergraduate();
        students[3].name="HH";
        students[3].sno="02311744615";
        students[3].scores[0]=72;
        students[3].scores[1]=91;
        students[3].scores[2]=95;
        students[4]=new Graduate();
        students[4].name="MM";
        students[4].sno="103121454512";
        students[4].scores[0]=67;
        students[4].scores[1]=96;
        students[4].scores[2]=84;
        System.out.println("姓名  学号  是否通过");
        for (int i=0;i<students.length;i++){
            System.out.println(students[i].name+" "+students[i].sno+" "+students[i].calGrade());
        }
    }}